inspector: Disable recursive inspection
authorMatthias Clasen <mclasen@redhat.com>
Wed, 13 May 2020 22:56:25 +0000 (18:56 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Wed, 13 May 2020 22:56:25 +0000 (18:56 -0400)
We can't inspect the inspector, it doesn't work.
Therefore, disable the keybindings in the
inspector window.

gtk/inspector/window.c

index c588554a527bba14619a7c2aa9e018757e6a34a7..7742ecb8d9f366368b15c597406f6eeefd7cc60d 100644 (file)
@@ -383,18 +383,29 @@ gtk_inspector_window_get_property (GObject    *object,
     }
 }
 
+static gboolean
+gtk_inspector_window_enable_debugging (GtkWindow *window,
+                                       gboolean   toggle)
+{
+  return FALSE;
+}
+
 static void
 gtk_inspector_window_class_init (GtkInspectorWindowClass *klass)
 {
   GObjectClass *object_class = G_OBJECT_CLASS (klass);
   GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
+  GtkWindowClass *window_class = GTK_WINDOW_CLASS (klass);
 
   object_class->constructed = gtk_inspector_window_constructed;
   object_class->dispose = gtk_inspector_window_dispose;
   object_class->set_property = gtk_inspector_window_set_property;
   object_class->get_property = gtk_inspector_window_get_property;
+
   widget_class->realize = gtk_inspector_window_realize;
 
+  window_class->enable_debugging = gtk_inspector_window_enable_debugging;
+
   properties[PROP_INSPECTED_DISPLAY] =
       g_param_spec_object ("inspected-display", "Inspected display", "Inspected display",
                            GDK_TYPE_DISPLAY,